<!DOCTYPE>
<html>
<head>
  <script type="text/javascript" src="functions.js" charset="utf-8"></script>
  <script type="text/javascript" src="client.js" charset="utf-8"></script>
  <script>
  	function on_load(){
  		//document.writeln(document.compatMode);
  		document.getElementById("btn_diag").onclick = function(){
  			var ret_arg = showModalDialog("dialog.html",
  				["Enter 3D point coordinaes","x","y","z"],
  				"dialogwidth:400;dialogheight:300;resizable:yes");
  			alert(ret_arg);
  		}
  		my_p.onclick = function(evt){
		 	console.log(evt.type);
		 	console.log(evt.target);
		 	console.log(this);
		 }
		 window.contextmenu = function(evt){
		 	console.log(evt);
		 }
  	};

    window.onerror = function(msg,url,line){
      if(onerror.count++ < onerror.max){
        alert("ERR: " + msg + "\n" + url + ":" + line);
        return true;
      }
    };
    onerror.max=3;
    onerror.count=0;

 window.onload = on_load;

  </script>
  <style type="text/css">
    strong{
      border:2px solid red;
      background-color:grey;
      cursor: crosshair;
    }
    p:first-letter{
      font-size:40px;
      color:red;
      border:1px dashed blue;
    }
    div#one{
    	display: inline-block;
    	#width: 300px;
    }
    div#two{
    	display: inline-block;
    	#position: relative;
    	#left: -200px;
    	#top: -200px;
    	width: 300px;
    	height: 300px;
    	z-index: 2;
    	border: 3px solid red;
    	background-color: yellow;
    	text-align:center;
    	vertical-align: middle;
    	opacity: 0.3;
    	border-radius: 200px;
    }
  </style>
</head>
<body>
<p>hello <strong onclick="throw('BAD');">error!!!</strong></p>
<input id="btn_diag" type="button" value="show dialog" />
<div id="one">
  <a name="p_in" href="#">hello p_0</a>
  <a name="p_in" href="#">hello p_1</a>
  <a name="p_in" href="#">hello p_2</a>
  <img name="pic" src="#" alt="pic0" />
  <img name="pic" src="#" alt="pic1" />
  <img name="pic" src="#" alt="pci2" />
  <p id="my_p">I'm <strong>BIG</strong> panda!!!</p>
</div>
<div id="two">
	<p>T W O</p>	
</div>
</body>
</html>
